package com.changy.ai_tutor_for_dm.mapper;

import com.changy.ai_tutor_for_dm.entity.Questions;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

@Mapper
public interface QuestionsMapper {

    /**
     * 插入一条题目基本信息
     * @param questions
     */
    @Insert("INSERT INTO questions (type, content, create_time, update_time) VALUES (#{type}, #{content}, #{createTime}, #{updateTime})")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    void insert(Questions questions);


}
